﻿using System;
using System.Collections.Generic;
using System.Text;
using LocalizationTest.Tools;

namespace LocalizationTest
{
  class PositionMeasurement2D : Measurement
  {
    Vector2 position;

    public Vector2 Position
    {
      get { return position; }
      set { position = value; }
    }

    public PositionMeasurement2D(Vector2 position, Sensor sensor)
    {
      this.position = position;
      this.sensor = sensor;
    }

    public override double GetValueAsDouble()
    {
      return position.Abs();
    }

    public override double GetDifference(Measurement other)
    {
      return 
        Math.Abs(this.position.x - ((PositionMeasurement2D)other).position.x) +
        Math.Abs(this.position.y - ((PositionMeasurement2D)other).position.y);
    }

    public override Measurement Parse(string str, Experiment experiment)
    {
      throw new Exception("The method or operation is not implemented.");
    }

    public override string ToString()
    {
      throw new Exception("The method or operation is not implemented.");
    }

  }
}
